package br.com.r1.caelum.factory;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class DatabaseFactory {

	private DatabaseFactory(){}
	
	private static final EntityManagerFactory emf;
	
	static {
		emf = Persistence.createEntityManagerFactory("controleFinancas");
	}
	
	public static EntityManager getEntityManager(){
		return emf.createEntityManager();
	}
	
}
